package com.gaga.crm.mapper;

import com.gaga.crm.pojo.SysUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @Entity com.gaga.lession04.pojo.SysUser
 */
public interface SysUserMapper extends JpaRepository<SysUser,Long>, JpaSpecificationExecutor<SysUser> {

    /**
     * 登录方法
     * @param usrName
     * @param usrPassword
     * @return
     */
    List<SysUser> findByUsrNameAndUsrPassword(String usrName, String usrPassword);


    /**
     * 根据用户名查询用户对象
     */
    SysUser findUserByUsrName(String usrName);

}
